const { listParentBehavior, listItemBehavior, formItemBehavior } = require('../behaviors')
const _ = require('../utils')

_.create('static', {
  properties: {
    hasArrow: Boolean,
    disabled: Boolean,
    label: String,
    helperText: {
      type: String,
      value: '',
    },
    bordered: {
      type: Boolean,
      value: true,
    },
  },

  behaviors: ['wx://form-field', listItemBehavior, formItemBehavior],

  relations: {
    listParent: {
      type: 'parent',
      target: listParentBehavior,
    },

    '../form-validator/index': {
      type: 'ancestor',
    },
  },
})
